package org.iteam.xlz.manager.action.ad;



import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.convention.annotation.Results;
import org.iteam.web.struts.action.AbstractModuleAction;
import org.iteam.web.struts.action.RestAction;
import org.iteam.xlz.core.entity.ad.AdstatisticsVo;
import org.iteam.xlz.core.service.ad.AdstatisticsService;

@SuppressWarnings("unchecked")
@Results({@Result(name="INDEX",type="freemarker",location="/WEB-INF/content/ad/adstatistics/index.html")})
public class AdAdstatisticsAction extends AbstractModuleAction<AdstatisticsVo> implements RestAction{

	/**
	 * 
	 */
	private static final long serialVersionUID = 8673733062641661333L;
	private final String PATH="/ad/adstatistics";
	@Override
	public AdstatisticsVo getModel() {
		if(null==model){
			model=new AdstatisticsVo();
		}
		return model;
	}

	@Override
	@Action(PATH+"/index")
	public String index() {
		return INDEX;
	}

	@Override
	@Action(PATH+"/query")
	public String query() {
		map.put("total",AdstatisticsService.getInstance().counts());
		map.put("rows",AdstatisticsService.getInstance().query(page,rows));		
		return MAP;
	}

	@Override
	public String show() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String create() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String update() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String delete() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String destroy() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String edit() throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String editNew() throws Exception {
		// TODO Auto-generated method stub
		return null;
	}
}
